/* 全局样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #333;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    width: 700px;
    height: 500px;
    overflow: hidden;
}

/* 主容器 */
.container {
    width: 700px;
    height: 500px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    min-width: 700px;
    min-height: 500px;
}

/* 标题栏 */
.header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 15px 20px;
    text-align: center;
}

.header h1 {
    font-size: 18px;
    font-weight: 600;
    margin: 0;
}

/* 主要内容区域 */
.main-content {
    display: flex;
    flex: 1;
    min-height: 400px;
    height: auto;
}

/* 左侧输入区域 */
.input-section {
    flex: 2;
    padding: 20px;
    border-right: 1px solid #e0e0e0;
    display: flex;
    flex-direction: column;
    min-width: 250px;
}

.input-section h3 {
    font-size: 14px;
    color: #555;
    margin-bottom: 10px;
    font-weight: 600;
}

#textInput {
    flex: 1;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    padding: 12px;
    font-size: 13px;
    resize: none;
    outline: none;
    transition: border-color 0.3s ease;
    font-family: inherit;
}

#textInput:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

#textInput::placeholder {
    color: #999;
    line-height: 1.4;
}

.input-info {
    margin-top: 8px;
    font-size: 12px;
    color: #666;
    text-align: right;
}

/* 中间参数设置区域 */
.settings-section {
    width: 160px;
    padding: 20px 15px;
    border-right: 1px solid #e0e0e0;
    background: #f8f9fa;
}

.settings-section h3 {
    font-size: 14px;
    color: #555;
    margin-bottom: 15px;
    font-weight: 600;
}

.setting-item {
    margin-bottom: 15px;
}

.setting-item label {
    display: block;
    font-size: 12px;
    color: #666;
    margin-bottom: 5px;
    font-weight: 500;
}

.setting-item select {
    width: 100%;
    padding: 6px 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 12px;
    background: white;
    outline: none;
    transition: border-color 0.3s ease;
}

.setting-item select:focus {
    border-color: #667eea;
}

.setting-item input[type="color"] {
    width: 100%;
    height: 32px;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    outline: none;
}

.reset-btn {
    width: 100%;
    padding: 8px;
    background: #6c757d;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    margin-top: 10px;
}

.reset-btn:hover {
    background: #5a6268;
}

/* 右侧二维码展示区域 */
.qrcode-section {
    flex: 2;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 250px;
}

.qrcode-section h3 {
    font-size: 14px;
    color: #555;
    margin-bottom: 15px;
    font-weight: 600;
    align-self: flex-start;
}

.qrcode-container {
    position: relative;
    margin-bottom: 15px;
    border: 2px dashed #e0e0e0;
    border-radius: 8px;
    padding: 10px;
    background: #fafafa;
}

#qrcode {
    display: none;
    border-radius: 4px;
}

.placeholder {
    width: 200px;
    height: 200px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #999;
    text-align: center;
}

.placeholder-icon {
    font-size: 48px;
    margin-bottom: 10px;
    opacity: 0.5;
}

.placeholder p {
    font-size: 13px;
    line-height: 1.4;
}

/* 操作按钮 */
.actions {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}

.download-btn, .copy-btn {
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.download-btn {
    background: #28a745;
    color: white;
}

.download-btn:hover:not(:disabled) {
    background: #218838;
    transform: translateY(-1px);
}

.copy-btn {
    background: #17a2b8;
    color: white;
}

.copy-btn:hover:not(:disabled) {
    background: #138496;
    transform: translateY(-1px);
}

.download-btn:disabled, .copy-btn:disabled {
    background: #6c757d;
    cursor: not-allowed;
    opacity: 0.6;
}

/* 二维码信息 */
.qrcode-info {
    text-align: center;
    color: #666;
    font-size: 11px;
}

/* 底部信息 */
.footer {
    padding: 10px 20px;
    background: #f8f9fa;
    border-top: 1px solid #e0e0e0;
    text-align: center;
}

.footer small {
    color: #666;
    font-size: 11px;
    line-height: 1.4;
}

/* 响应式设计 */
@media (max-width: 650px) {
    .container {
        width: 100vw;
        height: 100vh;
        border-radius: 0;
    }
    
    .main-content {
        flex-direction: column;
    }
    
    .settings-section {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid #e0e0e0;
    }
    
    .qrcode-section {
        flex: none;
    }
}

/* 动画效果 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

#qrcode.show {
    display: block;
    animation: fadeIn 0.3s ease;
}

.placeholder.hide {
    display: none;
}

/* 滚动条样式 */
#textInput::-webkit-scrollbar {
    width: 6px;
}

#textInput::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

#textInput::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

#textInput::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}